//
//  TodayCell.m
//  BeautyClother
//
//  Created by dllo on 15/9/18.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "TodayCell.h"

@implementation TodayCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.image1 = [[UIImageView alloc] init];
        [self.contentView addSubview:_image1];
        [_image1 release];
        
        self.text1 = [[UILabel alloc] init];
        [self.image1 addSubview:_text1];
        [_text1 release];
        
        self.today1 = [[UILabel alloc] init];
        [self.image1 addSubview:_today1];
        [_today1 release];
        
        self.image2 = [[UIImageView alloc] init];
        [self.contentView addSubview:_image2];
        [_image2 release];
        
        self.text2 = [[UILabel alloc] init];
        [self.image2 addSubview:_text2];
        [_text2 release];
        
        self.today2 = [[UILabel alloc] init];
        [self.image2 addSubview:_today2];
        [_today2 release];
        }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat offwidth = [UIScreen mainScreen].bounds.size.width / 375;
    CGFloat offheight = [UIScreen mainScreen].bounds.size.height / 667;
    CGFloat width = self.contentView.frame.size.width;
    
    CGFloat height = self.contentView.frame.size.height;
    
    self.image1.frame = CGRectMake(5, 5, (width - 15) / 2, height - 10);
    
    self.text1.frame = CGRectMake(35 * offwidth, 175 * offheight, 110 * offwidth, 30 * offheight);
    self.text1.backgroundColor = [UIColor clearColor];
    self.text1.layer.cornerRadius = 5;
    self.text1.layer.masksToBounds = YES;
    self.text1.textAlignment = 1;
    
    self.today1.frame = CGRectMake(35 * offwidth, 200 * offheight, 110 * offwidth, 15 * offheight);
    self.today1.font = [UIFont systemFontOfSize:12];
    self.today1.textAlignment = 1;
    self.today1.textColor = [UIColor darkGrayColor];
    
    self.image2.frame = CGRectMake(self.image1.frame.size.width + self.image1.frame.origin.x + 5 , 5, (width - 15) / 2, height - 10);
    
    self.text2.frame = CGRectMake(35 * offwidth, 175 * offheight, 110 * offwidth, 30 * offheight);
    self.text2.backgroundColor = [UIColor clearColor];
    self.text2.layer.cornerRadius = 5;
    self.text2.layer.masksToBounds = YES;
    self.text2.textAlignment = 1;
    
    self.today2.frame = CGRectMake(35 * offwidth, 200 * offheight, 110 * offwidth, 15 * offheight);
    self.today2.font = [UIFont systemFontOfSize:12];
    self.today2.textAlignment = 1;
    self.today2.textColor = [UIColor darkGrayColor];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
